module.exports = {
  configureWebpack: {},
  devServer: { // 环境配置
    host: '0.0.0.0',
    // public: '192.168.1.6:8080',
    port: '8081',
    https: false,
    disableHostCheck: true,
    open: false, // 配置自动启动浏览器
    // devtool: 'inline-source-m ap',

    // assetsSubDirectory: 'static',
    // assetsPublicPath: '/',
    proxy: {
      '/newdata': {
        target: 'https://view.inews.qq.com',
        changeOrigin: true,
        secure: false,
        pathRewrite: { '^/newdata': '/' }

      },
      '/journey': {
        target: 'https://r.inews.qq.com',
        changeOrigin: true,
        secure: false,
        pathRewrite: { '^/journey': '/' }

      },
      // 这是疫苗动态代理接口
      '/vaccine': {
        target: 'https://v.qq.com',
        changeOrigin: true,
        secure: false,
        pathRewrite: { '^/vaccine': '/' }
      },
      //socket跨域
      // '/socket.io': {
      //   target: 'http://localhost:24000/', // target host
      //   changeOrigin: true, // needed for virtual hosted sites
      //   logLevel: 'debug'
      // },
      // '/sockjs-node': {
      //   target: 'http://localhost:24000',
      //   ws: false,
      //   changeOrigin: true

      // }
    }
  },
}